home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8363 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: tmpnews.crd.ge.com!rebecca!rpi!not-for-mail
  2. From: jyacc!hymie@uunet.uu.net (Hyman Rosen)
  3. Newsgroups: comp.lang.c++.moderated,comp.lang.c++
  4. Subject: Re: enum expression is IF statement
  5. Date: 17 Feb 1996 02:58:27 -0000
  6. Organization: JYACC, Inc.
  7. Sender: cppmods@netlab.cs.rpi.edu
  8. Approved: vandevod@cs.rpi.edu
  9. Message-ID: <4g3g8j$7cl@netlab.cs.rpi.edu>
  10. References: <4fq7dc$pac@netlab.cs.rpi.edu> <4g1pj9$pqg@netlab.cs.rpi.edu>
  11. NNTP-Posting-Host: netlab.cs.rpi.edu
  12. X-Original-Date: Sat, 17 Feb 1996 01:41:05 GMT
  13.  
  14. In article <4g1pj9$pqg@netlab.cs.rpi.edu>
  15. gstern@earth.usa.net (Greg Sternberg/PDS Inc) writes:
  16. >      You're making the assumption that the compiler is numbering your enums
  17. >      sequentially from 0 - since the standard says nothing about how the
  18. >      compiler could number your enums it could very well be using 0x1, 0x2, 
  19. >      0x4, and 0x8.
  20. >
  21. >   { If this is true this is a fairly obscure, important C incompatibility
  22. >     references anyone ? -mod}
  23.  
  24. No, of course it's not true. See [dcl.enum]. Enumerators start at zero
  25. and go up by one.
  26.  
  27.       [ Articles to moderate: mailto:c++-submit@netlab.cs.rpi.edu ]
  28.       [  Read the C++ FAQ: http://www.connobj.com/cpp/cppfaq.htm  ]
  29.       [  Moderation policy: http://www.connobj.com/cpp/guide.htm  ]
  30.       [      Comments? mailto:c++-request@netlab.cs.rpi.edu       ]
  31.